package com.tiger.admin.http.encipher;

import com.tiger.utils.ResponseUtil;
import jakarta.servlet.http.HttpSession;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("encipher")
public class EncipherController {
    private final EncipherService encipherService;

    public EncipherController(EncipherService encipherService) {
        this.encipherService = encipherService;
    }

    @GetMapping("get")
    public Object publicEncipher(HttpSession httpSession) {
        return ResponseUtil.successRes(encipherService.getPublic(httpSession));
    }
}
